package com.sumainfor.schedule.controller;

import com.sumainfor.schedule.service.impl.TenBillService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zc
 * @ClassName TenBillController
 * @date 2019/12/29 11:48
 * @description: TODO
 */
@Component
public class TenBillController {
    Logger log= LoggerFactory.getLogger(TenBillController.class);

    @Autowired
    TenBillService tenBillService;

    /**
     * 租客账单推送(每天早上6点推送未支付账单)
     */
    @Scheduled(cron = "0 0 12 * * ?")
    public void TenBillCon(){
        Map<String,Object> params = new HashMap<>();
        params.put("Status",1);//只查询待支付的账单
        log.info("1111111111");
        log.info("params"+params);
        tenBillService.TenBillCon(params);




    }
}
